/* @(#) somx/readme 2.4 4/19/94 21:44:32 [5/23/94 10:09:25] */

/*
 * 96F8647, 96F8648, 96F8850 (C) Copyright IBM Corp. 1992, 1994
 * All Rights Reserved
 * Licensed Materials - Property of IBM
 *
 * DISCLAIMER OF WARRANTIES.
 * The following [enclosed] code is sample code created by IBM
 * Corporation. This sample code is not part of any standard or IBM
 * product and is provided to you solely for the purpose of assisting
 * you in the development of your applications.  The code is provided
 * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
 * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
 * THIS CODE.  IBM shall not be liable for any damages arising out of
 * your use of the sample code, even if they have been advised of the
 * possibility of such damages.
 *
 * DISTRIBUTION.
 * This sample code can be freely distributed, copied, altered, and
 * incorporated into other software, provided that it bears the above
 * Copyright notice and DISCLAIMER intact.
 */

This directory contains a sample program that illustrates the use of
Event Manager.  The executable built is called "emandemo".

Before building the executable make sure the environment SOMBASE is set
to the root directory of SOM. Make sure the environment variable SOMIR
is set appropriately.

To build the executable type the following commands:
	wmake /f makefile.wmk clean
	wmake /f makefile.wmk

Before running the program, make sure that the following environment
variables are set.

- SOMSOCKETS should be set to the name of the Socket implementation
  class (Typically "TCPIPSockets").
- HOSTNAME should be set to machine on which this program is running.

Run the program by invoking the command "emandemo".

NOTES: 

1) Running the Program:

The following are the single character commands supported by the test
program.
 h  - help; prints a list of commands available
 c  - Creates a client event with a method callback
 C  - Creates a client event with a procedure callback
 W  - Registers a Work procedure to be called back when there are
      no events.
 w  - Unregisters the above work procedure interest
 T  - Registers a timer that pops every 100 milliseconds
 U  - Changes the above timer registration to pop every 800
      milliseconds instead
 t  - Unregisters the above timer
 P  - Creates a socket, binds it to a port, registers the socket
      with EMan and then listens for stream connections. When a
      connection is made, the new socket created for the connection
      is also registered with EMan for input messages (msg socket).
 p  - Unregisters the above listening socket.
 S  - Connects to the above listening socket and sends a message.
      When the message is received fully, the connection is brought
      down by the callback.
 q  - quit
 Q  - quit

Any other character is a no op.

